package array1.array01;

//案例1： 定义一个数组  求数组里面的最大值
//    int[] arr = {6,7,4,3,9,5,7,8};   // 打印最大值
public class demo1 {
    public static void main(String[] args) {
        int max = 0;
        int[] arr = {6, 7, 4, 3, 9, 5, 7, 8, 20};
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] > max) {
                max = arr[i];
            }
        }
        System.out.println(max);
    }
}
